﻿Imports System.Text.RegularExpressions

Public Class TextParser
    Public Function GetListOfLines(ByVal FileContent As String) As List(Of String())
        Dim Lines = Regex.Split(FileContent, Environment.NewLine)
        Dim Adresses = New List(Of String())
        Dim Adress = New List(Of String)

        For Each Line In Lines.Skip(1)
            If Not Line = "" Then
                Dim AdressArray = Regex.Split(Line, ",")
                For Each AdressPart As String In AdressArray
                    Adress.Add(AdressPart.Trim)
                Next
                Adresses.Add(Adress.ToArray)
            End If
        Next

        Return Adresses
    End Function

End Class